Repository navigation
gomodjail: update to v2.0.1, enforce static analysis in CI - #5192
Merged
Merged
Conversation
AkihiroSuda
force-pushed
the
gomodjail
branch
3 times, most recently
from
September 8, 2026 21:00
dd7e775 to
6d22d15
Compare
AkihiroSuda
marked this pull request as ready for review
September 8, 2026 21:00
AkihiroSuda
force-pushed
the
gomodjail
branch
from
September 9, 2026 02:52
6d22d15 to
3c8a969
Compare
AkihiroSuda
commented
Sep 9, 2026
AkihiroSuda
marked this pull request as draft
September 9, 2026 02:53
AkihiroSuda
force-pushed
the
gomodjail
branch
2 times, most recently
from
September 9, 2026 03:28
8b3f709 to
542fae6
Compare
AkihiroSuda
marked this pull request as ready for review
September 9, 2026 03:29
gomodjail v2 moves the focus from the dynamic (seccomp) mode to a static analysis gate: `gomodjail analyze` fails if a module annotated `gomodjail:confined` in go.mod can reach a denied capability (filesystem, network, process execution, raw syscalls, OS state modification, or cgo). - Dockerfile: bump GOMODJAIL_VERSION to v2.0.1. `gomodjail pack` is unchanged in v2, so the packed `nerdctl.gomodjail` binary (dynamic mode) keeps working as before. - Makefile: add `lint-gomodjail` / `lint-gomodjail-all` (part of `make lint`) and `fix-gomodjail` (part of `make fix`), and install gomodjail in `install-dev-tools`. The gate is only enforced for linux/amd64 and linux/arm64: these are the only platforms the packed binary is built for, and the only ones the dynamic mode supports. The verdicts are platform-dependent, hence both architectures are analyzed. - CI: add the `gomodjail` job to the lint workflow. - go.mod: `gomodjail fix` downgraded the annotation of the 39 modules that fail the gate to `gomodjail:unconfined`, so that the decision stays visible and reviewable. 57 modules remain confined (24 ok, 33 warnings, 0 violations). The inline annotations are also reformatted to `// gomodjail:...`, the style `gomodjail fix` writes, so that future fixes do not leave go.mod in two styles. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
AkihiroSuda
force-pushed
the
gomodjail
branch
from
September 9, 2026 06:31
542fae6 to
407df05
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gomodjail v2 moves the focus from the dynamic (seccomp) mode to a static analysis gate:
gomodjail analyzefails if a module annotatedgomodjail:confinedin go.mod can reach a denied capability (filesystem, network, process execution, raw syscalls, OS state modification, or cgo).gomodjail packis unchanged in v2, so the packednerdctl.gomodjailbinary (dynamic mode) keeps working as before.lint-gomodjail/lint-gomodjail-all(part ofmake lint) andfix-gomodjail(part ofmake fix), and install gomodjail ininstall-dev-tools. The gate is only enforced for linux/amd64 and linux/arm64: these are the only platforms the packed binary is built for, and the only ones the dynamic mode supports. The verdicts are platform-dependent, hence both architectures are analyzed.gomodjailjob to the lint workflow.gomodjail fixdowngraded the annotation of the 39 modules that fail the gate togomodjail:unconfined, so that the decision stays visible and reviewable. 57 modules remain confined (24 ok, 33 warnings, 0 violations). The inline annotations are also reformatted to// gomodjail:..., the stylegomodjail fixwrites, so that future fixes do not leave go.mod in two styles.